import Vue from 'vue'
import VueRouter from 'vue-router'

import Main from '@/page/Main'
const Subscribe = resolve => require(['@/page/Subscribe.vue'], resolve) //预约
const Enroll = resolve => require(['@/page/Enroll.vue'], resolve) //报名
const Questionnaire= resolve => require(['@/page/Questionnaire.vue'], resolve) //问卷调查
Vue.use(VueRouter)

export default new VueRouter({
  base: __dirname,
  mode: 'history',
  routes: [{
      path: '/',
      component: Main,
      meta: { requiresAuth: true, title: '线上教育' }
  }, {
    path: '/subscribe',
    component: Subscribe,
    meta: { requiresAuth: true, title: '预约接种' }
  }, {
    path: '/enroll',
    component: Enroll,
    meta: { requiresAuth: true, title: '完善用户信息' }
  }, {
    path: '/questionnaire',
    component: Questionnaire,
    meta: { title: '问卷调查' }
  }]
})
